package bancodedados;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

public class Helper extends SQLiteOpenHelper {
		public Helper(Context context)
		{
			super(context, "List", null, 1);
			
		}
		
		@Override
		public void onCreate(SQLiteDatabase db)
		{
			db.execSQL("CREATE TABLE Cadastro(_id INTEGER PRIMARY KEY, matricula INTEGER, nome TEXT NOT NULL, endereco TEXT NOT NULL," +
					"telefone TEXT NOT NULL, sexo TEXT NOT NULL, senha TEXT NOT NULL);");
			db.execSQL("CREATE TABLE Professor(_id INTEGER PRIMARY KEY, matricula INTEGER, nome TEXT NOT NULL, endereco TEXT NOT NULL," +
					"telefone TEXT NOT NULL, sexo TEXT NOT NULL, senha TEXT NOT NULL);");
			db.execSQL("CREATE TABLE Aluno(_id INTEGER PRIMARY KEY, matricula INTEGER, turma TEXT NOT NULL);");
			db.execSQL("CREATE TABLE Turma(_id INTEGER PRIMARY KEY, ano TEXT NOT NULL, numero TEXT NOT NULL);");
			db.execSQL("CREATE TABLE Disciplina(_id INTEGER PRIMARY KEY, nome TEXT NOT NULL);");
		
		}
		
		@Override
		public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion)
		{
			
		}
	}



